package cn.qingyun.gis.modules.scenes.service.impl;

import cn.qingyun.gis.modules.scenes.contant.ComConstant;
import cn.qingyun.gis.modules.scenes.entity.IntentionInfo;
import cn.qingyun.gis.modules.scenes.entity.PoiScenarioProofread;
import cn.qingyun.gis.modules.scenes.mapper.PoiScenarioProofreadMapper;
import cn.qingyun.gis.modules.scenes.request.BusinessContentRequest;
import cn.qingyun.gis.modules.scenes.request.BusinessMarketingRequest;
import cn.qingyun.gis.modules.scenes.request.IntentionInfoRequest;
import cn.qingyun.gis.modules.scenes.response.*;
import cn.qingyun.gis.modules.scenes.service.IPoiScenarioProofreadService;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author guest
 * @since 2024-04-27
 */
@Service
@DS("scenes_offensive")
public class PoiScenarioProofreadServiceImpl extends ServiceImpl<PoiScenarioProofreadMapper, PoiScenarioProofread> implements IPoiScenarioProofreadService {

    @Resource
    private PoiScenarioProofreadMapper poiScenarioProofreadMapper;

    @Override
    public List<IntentionRecordResponse> selectIntentionInfoList(IntentionInfoRequest request,String table) {
        return poiScenarioProofreadMapper.selectIntentionInfoList(request, table);
    }

    /**
     * 查询随访poi归属人工号
     * @param id
     * @param type
     * @return
     */
    @Override
    public BelongPeopleResponse selectBelongKwPhone(String id, String type) {
        String table = ComConstant.TABLES.get(0);
        return poiScenarioProofreadMapper.queryBelongKwPhone(id, table);
    }
    @Override
    public List<IntentionToWgtResponse > selectBusinessContent(BusinessContentRequest request) {
        return poiScenarioProofreadMapper.selectBusiness(request);
    }

    @Override
    public BusinessTempResponse selectBusinessContentDetail(BusinessMarketingRequest request) {
        return poiScenarioProofreadMapper.selectBusinessDetail(request);
    }

    @Override
    public void updateIntentionInfo(String intentionInfo, BusinessMarketingRequest request) {
        poiScenarioProofreadMapper.updateIntentionInfo(intentionInfo,request);
    }
}
